# Contributor: Zephyr
pkgname=vba-m-gtk-svn
pkgver=877
pkgrel=1
pkgdesc="Gameboy Advance Emulator combining features of all VBA forks - GTK GUI"
arch=(i686 x86_64)
url="http://vba-m.ngemu.com"
license=('GPL')
groups=()
depends=('gtkmm' 'sdl' 'glibmm' 'libglademm' 'libpng' 'zlib' 'cairo' 'mesa' 'gtkglext' 'gtkglextmm' 'libxv')
makedepends=('cmake' 'pkgconfig' 'nasm' 'subversion')
source=()
md5sums=()

_svntrunk=https://vbam.svn.sourceforge.net/svnroot/vbam/trunk
_svnmod=vbam

build() {
 cd $startdir/src
 
   if [ -d $_svnmod/.svn ]; then
     (cd $_svnmod && svn up -r $pkgver)
   else
     svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
   fi
               
   msg "SVN checkout done or server timeout"
   msg "Starting make..."
                   
  cp -r $_svnmod $_svnmod-build
  cd $_svnmod-build
                       
  cmake . -DCMAKE_INSTALL_PREFIX=/usr -DDATA_INSTALL_DIR:PATH=share/vbam/gtk
  make || return 1
  make DESTDIR=$startdir/pkg/ install
  
  rm -rf $startdir/src/$_svnmod-build
        }
